/*
 *  film.h
 *  AutoEllips
 *
 *  Created by Simon Martin on 09/11/2009.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */
#ifndef _PSIDELTA_
#include "ellipsincludes.h"
#include "TerminalLibrary.h"
#define WIDTH 40
#define HEIGHT 10 

int CalcD2(double angle, double delta, double tanp, double complex n1, double complex n2, double complex n3, double lambda, double complex *d2a, double complex *d2b);
int getpsidelta_solve(WINDOW *mainwnd, ellipspar_t *ellipsparams);
int solvepsidelta(WINDOW *mainwnd,ellipspar_t *ellipsparams, double psi, double delta);
int bisect(double angle, double delta,double  tanp,double n1,double nmin,double nmax, double  n3,double lambda,double complex * d2a, double complex * d2b, double *nresult);
// 18/5/2010 add search() as alternative to bisect method - simply scans through refractive
// index range and returns the best value.
int search(double angle, double delta,double  tanp,double complex n1,double  nmin,double nmax, double complex n3,double lambda,double complex * d2, double *nresult);
int MethodMenu(WINDOW *mainwnd);
void print_choice_menu(WINDOW *menu_win, int highlight,int n_choices);
#define _PSIDELTA_
#endif

